class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def greet(self):
        print(f"Hello, my name is {self.name} and I am {self.age} years old.")

    @classmethod
    def from_birth_year(cls, name, birth_year):
        current_year = 2025
        age = current_year - birth_year
        return cls(name, age)
    @staticmethod
    def is_adult(age):

        return age >= 18

person1 = Person("Alice", 30)
person2 = Person.from_birth_year("Bob", 1994)
person2.name="陈志源"
person2.greet()
